package com.cskaoyan.mall.service.mall;

import com.cskaoyan.mall.dao.mall.MallOrdersDao;
import com.cskaoyan.mall.dao.mall.MallOrdersDaoImpl;
import com.cskaoyan.mall.model.bo.mall.AddOrderBO;
import com.cskaoyan.mall.model.bo.mall.CartListBO;
import com.cskaoyan.mall.model.bo.mall.SendCommentBO;
import com.cskaoyan.mall.model.vo.mall.GetOrderByStateVO;

import java.util.List;

public class MallOrdersServiceImpl implements MallOrdersService{
    MallOrdersDao mallOrdersDao = new MallOrdersDaoImpl();
    @Override
    public int addOrder(AddOrderBO addOrderBO) {
        return mallOrdersDao.addOrder(addOrderBO);
    }

    @Override
    public List<GetOrderByStateVO> getOrderByState(String token, String state) {
        return mallOrdersDao.getOrderByState(token,state);
    }

    @Override
    public int deleteOrder(String id) {
        return mallOrdersDao.deleteOrder(id);
    }

    @Override
    public int settleAccounts(CartListBO cart) {
        return mallOrdersDao.settleAccounts(cart);
    }

    @Override
    public int confirmReceive(String id) {
        return mallOrdersDao.confirmReceive(id);
    }

    @Override
    public int sendComment(SendCommentBO comment) {
        return mallOrdersDao.sendComment(comment);
    }

    @Override
    public int pay(String id) {
        return mallOrdersDao.pay(id);
    }
}
